package com.wood.life.service.Impl;

import com.night.common.entity.life.OrderDetails;
import com.wood.life.mapper.OrderDetailsMapper;
import com.wood.life.service.OrderDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author: dz
 * 2022-10-20-15:54
 */
@Service
public class OrderDetailsServiceImpl implements OrderDetailsService {
    @Autowired
    OrderDetailsMapper orderDetailsMapper;

    @Override
    public void insert(OrderDetails orderDetails) {
        orderDetailsMapper.insert(orderDetails);
    }

    @Override
    public void updateById(OrderDetails orderDetail) {
        orderDetailsMapper.updateById(orderDetail);
    }

    @Override
    public List<OrderDetails> getByOrderId(int orderId) {
        return orderDetailsMapper.getByOrderId(orderId);
    }

    @Override
    public List<OrderDetails> getByGoodsId(int goodsId) {
        return orderDetailsMapper.getByGoodsId(goodsId);
    }
}
